import { createApp } from 'vue'
import App from './App.vue'
import store from './store'
import { router } from '@/router/router.js'
import '@/router/permission.js'

import 'vant/es/toast/style'
import '@/assets/css/vant.less'

// 引入 echarts
// echarts-init用来对按需加载,减少包体积
import echarts from '@/utils/echarts-init'

import { showToast } from 'vant'
import tableSearch from '@/components/table-search.vue'

// console.log('Toast', Toast)

const app = createApp(App)
app.use(store)
app.use(router)
app.component('TableSearch', tableSearch)
app.config.globalProperties.$echarts = echarts
app.config.globalProperties.$toast = showToast
app.mount('#app')

